window.onload=function(){
    $('.in').click(function(){
        let username = $('input[name=username]').val();
        let password = $('input[name=password]').val()
        $.ajax({
            url:'/sider/login',
            method:'post',
            data:{username:username,password:password},
            success:function(res){
                if(res.state){
                    sessionStorage.setItem('username',res.username)
                    sessionStorage.setItem('userid',res.userid)
                    location.href='/pages/xitongshouye--shikaiwen/shouye.html'
                }else{
                    alert("登录失败")
                }
            }
        })
    })
}